<?php
include"connect_flag.php";
  
    $datei = $_REQUEST['datei'];
    $name = "uploads/".$_FILES['datei']['name'];
    $photo_name = preg_replace('/\s+/', '-', $name);
    $photo_name_save = preg_replace('/\s+/', '-', $_FILES['datei']['name']);
  $photo_name_save = "uploads/badges/".$photo_name_save;

		mysqli_query($con, "UPDATE badge_id SET photo = '$photo_name_save' WHERE id = '1' ") or die("query:" . mysqli_error($con));

	mysqli_close($con);
//    require_once(dirname(__FILE__) . "/uploader9.php");
include "uploader9.php";
?>
